import Sact from "sact";
let template = `
<div  class="chatModal">
            <div @click="props.cancel && props.cancel()" s-if="props.show" class="weui-mask"></div>
            <div s-if="props.show" class="weui-dialog">
                <div class="weui-dialog__hd"><strong class="weui-dialog__title">{{props.title}}</strong></div>
                <div class="weui-dialog__bd">
                    <slot></slot>
                </div>
            <div class="weui-dialog__ft">
                <button s-if="props.cancel" @click="props.cancel()" class="weui-dialog__btn" style="color:#000">取消</button>
                <button s-if="props.ok" @click="props.ok()" class="weui-dialog__btn">确定</button>
            </div>
        </div>
</div>
`
export default Sact.component({
    props:["cancel","show","ok"],
    name:"modal",
    template,
})